<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv=X-UA-Compatible content="IE=edge">
		<meta name=viewport content="width=device-width,initial-scale=1">

		<title>TTS</title>
		<!-- import CSS -->
		<link rel="stylesheet" href="./style/element-ui@2.15.13.css" />
		<!-- <link rel="stylesheet" href="https://unpkg.com/element-ui@2.15.13/lib/theme-chalk/index.css" /> -->
	</head>
	<body>
		<div id="app">
			<router-view></router-view>
		</div>
	</body>
	<!-- import Vue before Element -->
	<script src="./script/vue@2.7.14.js"></script>
	<!-- <script src="https://unpkg.com/vue@2.7.14/dist/vue.js"></script> -->

	<!-- import Vue Router -->
	<script src="./script/vue-router@3.6.5.js"></script>
	<!-- <script src="https://unpkg.com/vue-router@3.6.5/dist/vue-router.js"></script> -->	

	<!-- import JavaScript -->
	<script src="./script/element-ui@2.15.13.js"></script>
	<!-- <script src="https://unpkg.com/element-ui@2.15.13/lib/index.js"></script> -->
	
	<script src="./script/linq@3.2.0.js"></script>
	<!-- <script src="https://unpkg.com/element-ui@2.15.13/lib/index.js"></script> -->

	<script src="./script/object-utils@0.1.0.js"></script>
	<script src="./script/query@0.1.0.js"></script>


	<!-- import view -->	
	<script src="./view/menu.js"></script>
	<script src="./view/TODO.js"></script>

	<!-- 安卓 -->
	<script src="./view/Permission.js"></script>

	<!-- 语音引擎 -->
	<script src="./view/TTS.js"></script>

	<!-- 场景 -->
	<script src="./view/ForSleep.js"></script>
	<script src="./view/ForBrushTeeth.js"></script>
	
	<script>		
		//#region 创建路由实例并配置路由规则
		const routerArr = [
				// { path: '/', component: view_main }, // 根路由
				{ path: '/', component: view_menu, IsIgnore: true }, // 根路由
				{ path: '/view/TTS', component: view_TTS, DisplayName: "TTS语音引擎" },
				{ path: '/view/ForSleep', component: view_ForSleep, DisplayName: "场景: 睡觉" },
				{ path: '/view/ForBrushTeeth', component: view_ForBrushTeeth, DisplayName: "场景: 刷牙" },
		];

		const router = new VueRouter({ routes: routerArr });
		//#endregion

		new Vue({
			el: "#app",
			router, // 注入路由
			data: function () {
				return {
					pageHeaderContent: "主菜单",
				};
			},
			beforeRouteUpdate(to, from, next) {
				console.log(arguments);

				// 在这里执行你的逻辑，可以检查 from 和 to 的值
				console.log('Navigated from', from, 'to', to);

				// 继续导航
				next();
			},
			methods: {
				Set_Page_Header_Content: function(d) {
					this.pageHeaderContent = d;
				}				
			},
		});
	</script>
	<style></style>
</html>
